1. Field of the Invention
The present invention relates generally to methods and systems for transferring data between hosts and storage devices in a virtual data storage system and, more particularly, to a method and system for allocating logical paths (i.e., physical links) between hosts and a controller in a virtual data storage system such that the loads on the logical paths are distributed evenly across the logical paths.
2. Background Art
Virtual data storage systems include a plurality of physical data storage devices for storing data provided by host processors (hosts). Hosts may later access the storage devices to obtain stored data in order to read the stored data and update the stored data. Upon updating the stored data, the hosts may access the storage devices to store the updated stored data and possibly rewrite the stored data with the updated stored data.
Typical virtual data storage systems include a relatively large number of storage devices which are made available to each host by a controller. The controller is interposed between the hosts and the storage devices and generally connects the hosts to the storage devices. Each host includes at least one logical path (i.e., physical link). Typically, the at least one physical link (i.e., link) of a host includes four links. The links of a host connect the host to the front end of the controller. A host and the controller communicate data via a link for enabling the host to store data on the storage devices and for enabling the host to read data stored on the storage devices. Each storage device includes a device path. The device path of a storage device connects the storage device to the back end of the controller. A storage device and the controller communicate data via the device path for enabling a host to store data on the storage device and for enabling a host to read data stored on the storage device.
For storage operations, the controller routes data from a host for storage on a storage device. The host communicates the data to be stored to the controller using a selected link. The controller then routes the data to a selected storage device for storage via the device path of the selected storage device. The controller selects which storage device is to store data from the host depending on the storage attributes and the current status of the storage devices. In effect, the controller connects the selected link of the host to the device path of the selected storage device in order to transfer data from the host to the selected storage device for storage operations. During a storage operation, the host is unaware as to which storage device stores the data.
For reading operations, the controller receives a request from a host for reading stored data. In response, the controller locates the storage device having the stored data. The controller then accesses the stored data from the storage device via the device path of the storage device. The controller then selects a link of the host and routes the accessed stored data to the host via the selected link. In effect, the controller connects the device path of the storage device having the stored data to the selected link of the host in order to transfer the stored data from the storage device to the host for reading operations. During a reading operation, the host is unaware as to which storage device is providing the stored data.
Typically, the controller selects a link out of a group of links of a host by selecting the first available link having no input/output activity. A problem with such a selection criteria is that some links of a host end up being more heavily used than other links of the host. When there are many input/output activities, these heavily used links will have many host contentions which will cause a relatively large number of deny connections being presented by the host to the controller. In general, the problem with such a selection criteria is that it inefficiently uses link, controller, and host resources.
Accordingly, it is an object of the present invention to provide a method and system for allocating logical paths between a host and a controller in a virtual data storage system such that the loads on the logical paths (i.e., physical links) are distributed evenly across the logical paths.
It is another object of the present invention to provide a method and system for allocating logical paths between a host and a controller in a virtual data storage system such that the loads on the logical paths are distributed uniformly across the logical paths in order to provide faster connections to the logical paths by reducing the number of host contentions.
It is a further object of the present invention to provide a method and system for allocating logical paths between a host and a controller in a virtual data storage system in which the controller includes a counter associated with a respective logical path for monitoring the number of connection requests queued on the respective logical path.
It is still another object of the present invention to provide a method and system for allocating logical paths between hosts and a controller in a virtual data storage system such that the loads on the logical paths are distributed evenly across the logical paths.
In carrying out the above objects and other objects, the present invention provides a data storage system. The system includes at least one host, a plurality of storage devices, and a controller. The host has a plurality of links. Each storage device has a respective device path. The controller has a plurality of counters. The links connect the host to the controller. The device paths connect the respective storage devices to the controller. Each counter of the controller is associated with a respective one of the links for counting or determining an amount of queued connection requests from the storage devices to the host on each one of the links. The controller selects a link for a new connection request from a storage device to the host as a function of the amount of queued connection requests on each of the links. Preferably, the controller selects the link having the lowest amount of queued connection requests to be the selected link for the new connection request.
The controller may select a link for the new connection request from a storage device to the host as a function of the amount of queued connection requests on each of the links which are void of input/output activity while the controller makes the selection.
The controller associates the new connection request with the queued connection requests on the selected link. The counter associated with the selected link increments by one when the new connection request is associated with the queued connection requests on the selected link. The counter associated with the selected link decrements by one when a queued connection request on the selected link is honored by the host.
The controller may remove links which have a maximum amount of queued connection requests from being considered as the selected link for the new connection request. The controller enables removed links to be considered as the selected link for the new connection request once the amount of queued connection requests of the removed links is lowered from the maximum amount of queued connection requests to a minium amount of queued connection requests.
Further, in carrying out the above objects and other objects, the present invention provides a method for enabling a host having a plurality of links to read data from storage devices in a data storage system. The method includes receiving a connection request for connecting a storage device to the host. An amount of queued connection requests from the storage devices to the host on each link is then counted or determined. A link for the new connection request is then selected as a function of the amount of queued connection requests on each of the links. Preferably, the link having the lowest amount of queued connection requests is selected as the selected link.
The advantages associated with the method and system of the present invention are numerous. For instance, the method and system of the present invention allow the connection requests from storage devices to a host to be distributed evenly across the links of the hosts. As a result, faster connections are provided by the links which reduce the number of host contentions.
The above objects and other objects, features, and advantages of the present invention are readily apparent from the following detailed description when taken in connection with the accompanying drawings.